<template>
  <div class="activity">
    <a
      class="activity-item"
      v-for="item in activityList"
      :key="item.title"
      :title="item.title"
      :href="item.href || 'javascript:;'">
      <img :src="item.img" :alt="item.title">
    </a>
  </div>
</template>

<script>
export default {
  name: 'activity',
  data () {
    return {
      activityList: [
        {
          title: '读一读爱情的模样',
          href: 'http://promotion.kongfz.com/promotion/love_pc',
          img: '/static/img/img01.jpg'
        }, {
          title: '名家·芥川龙之介',
          href: 'http://promotion.kongfz.com/promotion/Akutagawa_pc',
          img: '/static/img/img02.jpg'
        }, {
          title: '美国文学·我听见钟声在响，人们都在欢呼',
          href: 'http://promotion.kongfz.com/promotion/meiguowenxue_pc',
          img: '/static/img/img03.jpg'
        }
      ]
    }
  },
  created () {

  }
}
</script>

<style lang="scss" scope>
  .activity {
    display: grid;
    margin: 15px 0px;
    grid-template-columns: 1fr 1fr 1fr;
    grid-column-gap: 15px;
    .activity-item {
      display: block;
      img {
        width: 100%;
      }
    }
  }
</style>
